package com.liujit.gateway.route.service;

import com.liujit.gateway.route.domain.GatewayRouteDefinition;
import org.springframework.context.ApplicationEventPublisherAware;
import reactor.core.publisher.Mono;

import java.util.List;

/**
 * @author: liujun
 * @date: 2021/6/15 7:18 下午
 * @description: 动态路由Service
 */
public interface DynamicRouteService extends ApplicationEventPublisherAware {

    /**
     * 查询列表
     *
     * @return java.util.List<com.liujit.gateway.domain.GatewayRouteDefinition>
     * @author: liujun
     * @date: 2021/6/15 7:41 下午
     */
    Mono<List<GatewayRouteDefinition>> getList();


    /**
     * 添加
     *
     * @param gatewayRouteDefinition
     * @return java.lang.Boolean
     * @author: liujun
     * @date: 2021/6/15 7:19 下午
     */
    Boolean add(GatewayRouteDefinition gatewayRouteDefinition);


    /**
     * 删除
     *
     * @param id
     * @return:
     * @author: liujun
     * @date: 2021/6/9 10:43 上午
     */
    Boolean del(String id);

    /**
     * 修改
     *
     * @param gatewayRouteDefinition
     * @return:
     * @author: liujun
     * @date: 2021/6/9 10:43 上午
     */
    Boolean upd(GatewayRouteDefinition gatewayRouteDefinition);

    /**
     * 根据id查询
     *
     * @param id
     * @return:
     * @author: liujun
     * @date: 2021/6/9 10:24 上午
     */
    Mono<GatewayRouteDefinition> get(String id);

    /**
     * 刷新
     * @return java.lang.Boolean
     * @author: liujun
     * @date: 2021/6/15 10:24 下午
     */
    Boolean refresh();
}
